"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
    function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
    var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
    var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
    var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
    var _, done = false;
    for (var i = decorators.length - 1; i >= 0; i--) {
        var context = {};
        for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
        for (var p in contextIn.access) context.access[p] = contextIn.access[p];
        context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
        var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
        if (kind === "accessor") {
            if (result === void 0) continue;
            if (result === null || typeof result !== "object") throw new TypeError("Object expected");
            if (_ = accept(result.get)) descriptor.get = _;
            if (_ = accept(result.set)) descriptor.set = _;
            if (_ = accept(result.init)) initializers.unshift(_);
        }
        else if (_ = accept(result)) {
            if (kind === "field") initializers.unshift(_);
            else descriptor[key] = _;
        }
    }
    if (target) Object.defineProperty(target, contextIn.name, descriptor);
    done = true;
};
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
    var useValue = arguments.length > 2;
    for (var i = 0; i < initializers.length; i++) {
        value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
    }
    return useValue ? value : void 0;
};
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
    if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
    return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PartialCoursesInput = exports.CourseInput = void 0;
var graphql_1 = require("@nestjs/graphql");
var common_input_1 = require("./common.input");
var CourseInput = function () {
    var _classDecorators = [(0, graphql_1.InputType)()];
    var _classDescriptor;
    var _classExtraInitializers = [];
    var _classThis;
    var _name_decorators;
    var _name_initializers = [];
    var _name_extraInitializers = [];
    var _desc_decorators;
    var _desc_initializers = [];
    var _desc_extraInitializers = [];
    var _group_decorators;
    var _group_initializers = [];
    var _group_extraInitializers = [];
    var _baseAbility_decorators;
    var _baseAbility_initializers = [];
    var _baseAbility_extraInitializers = [];
    var _limitNumber_decorators;
    var _limitNumber_initializers = [];
    var _limitNumber_extraInitializers = [];
    var _duration_decorators;
    var _duration_initializers = [];
    var _duration_extraInitializers = [];
    var _reserveInfo_decorators;
    var _reserveInfo_initializers = [];
    var _reserveInfo_extraInitializers = [];
    var _refundInfo_decorators;
    var _refundInfo_initializers = [];
    var _refundInfo_extraInitializers = [];
    var _otherInfo_decorators;
    var _otherInfo_initializers = [];
    var _otherInfo_extraInitializers = [];
    var _reducibleTime_decorators;
    var _reducibleTime_initializers = [];
    var _reducibleTime_extraInitializers = [];
    var _coverUrl_decorators;
    var _coverUrl_initializers = [];
    var _coverUrl_extraInitializers = [];
    var CourseInput = _classThis = /** @class */ (function () {
        function CourseInput_1() {
            this.name = __runInitializers(this, _name_initializers, void 0);
            this.desc = (__runInitializers(this, _name_extraInitializers), __runInitializers(this, _desc_initializers, void 0));
            this.group = (__runInitializers(this, _desc_extraInitializers), __runInitializers(this, _group_initializers, void 0));
            this.baseAbility = (__runInitializers(this, _group_extraInitializers), __runInitializers(this, _baseAbility_initializers, void 0));
            this.limitNumber = (__runInitializers(this, _baseAbility_extraInitializers), __runInitializers(this, _limitNumber_initializers, void 0));
            this.duration = (__runInitializers(this, _limitNumber_extraInitializers), __runInitializers(this, _duration_initializers, void 0));
            this.reserveInfo = (__runInitializers(this, _duration_extraInitializers), __runInitializers(this, _reserveInfo_initializers, void 0));
            this.refundInfo = (__runInitializers(this, _reserveInfo_extraInitializers), __runInitializers(this, _refundInfo_initializers, void 0));
            this.otherInfo = (__runInitializers(this, _refundInfo_extraInitializers), __runInitializers(this, _otherInfo_initializers, void 0));
            this.reducibleTime = (__runInitializers(this, _otherInfo_extraInitializers), __runInitializers(this, _reducibleTime_initializers, void 0));
            this.coverUrl = (__runInitializers(this, _reducibleTime_extraInitializers), __runInitializers(this, _coverUrl_initializers, void 0));
            __runInitializers(this, _coverUrl_extraInitializers);
        }
        return CourseInput_1;
    }());
    __setFunctionName(_classThis, "CourseInput");
    (function () {
        var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
        _name_decorators = [(0, graphql_1.Field)({
                description: '课程名称',
            })];
        _desc_decorators = [(0, graphql_1.Field)({
                description: '课程描述',
                nullable: true,
            })];
        _group_decorators = [(0, graphql_1.Field)({
                description: '适龄人群',
            })];
        _baseAbility_decorators = [(0, graphql_1.Field)({
                description: '适合基础',
            })];
        _limitNumber_decorators = [(0, graphql_1.Field)({
                description: '限制上课人数',
            })];
        _duration_decorators = [(0, graphql_1.Field)({
                description: '持续时间',
            })];
        _reserveInfo_decorators = [(0, graphql_1.Field)({
                description: '预约信息',
                nullable: true,
            })];
        _refundInfo_decorators = [(0, graphql_1.Field)({
                description: '退款信息',
                nullable: true,
            })];
        _otherInfo_decorators = [(0, graphql_1.Field)({
                description: '其他说明信息',
                nullable: true,
            })];
        _reducibleTime_decorators = [(0, graphql_1.Field)(function () { return [common_input_1.ReducibleTimeInput]; }, {
                description: '可约时间',
                nullable: true,
            })];
        _coverUrl_decorators = [(0, graphql_1.Field)({
                description: '封面图',
                nullable: true,
            })];
        __esDecorate(null, null, _name_decorators, { kind: "field", name: "name", static: false, private: false, access: { has: function (obj) { return "name" in obj; }, get: function (obj) { return obj.name; }, set: function (obj, value) { obj.name = value; } }, metadata: _metadata }, _name_initializers, _name_extraInitializers);
        __esDecorate(null, null, _desc_decorators, { kind: "field", name: "desc", static: false, private: false, access: { has: function (obj) { return "desc" in obj; }, get: function (obj) { return obj.desc; }, set: function (obj, value) { obj.desc = value; } }, metadata: _metadata }, _desc_initializers, _desc_extraInitializers);
        __esDecorate(null, null, _group_decorators, { kind: "field", name: "group", static: false, private: false, access: { has: function (obj) { return "group" in obj; }, get: function (obj) { return obj.group; }, set: function (obj, value) { obj.group = value; } }, metadata: _metadata }, _group_initializers, _group_extraInitializers);
        __esDecorate(null, null, _baseAbility_decorators, { kind: "field", name: "baseAbility", static: false, private: false, access: { has: function (obj) { return "baseAbility" in obj; }, get: function (obj) { return obj.baseAbility; }, set: function (obj, value) { obj.baseAbility = value; } }, metadata: _metadata }, _baseAbility_initializers, _baseAbility_extraInitializers);
        __esDecorate(null, null, _limitNumber_decorators, { kind: "field", name: "limitNumber", static: false, private: false, access: { has: function (obj) { return "limitNumber" in obj; }, get: function (obj) { return obj.limitNumber; }, set: function (obj, value) { obj.limitNumber = value; } }, metadata: _metadata }, _limitNumber_initializers, _limitNumber_extraInitializers);
        __esDecorate(null, null, _duration_decorators, { kind: "field", name: "duration", static: false, private: false, access: { has: function (obj) { return "duration" in obj; }, get: function (obj) { return obj.duration; }, set: function (obj, value) { obj.duration = value; } }, metadata: _metadata }, _duration_initializers, _duration_extraInitializers);
        __esDecorate(null, null, _reserveInfo_decorators, { kind: "field", name: "reserveInfo", static: false, private: false, access: { has: function (obj) { return "reserveInfo" in obj; }, get: function (obj) { return obj.reserveInfo; }, set: function (obj, value) { obj.reserveInfo = value; } }, metadata: _metadata }, _reserveInfo_initializers, _reserveInfo_extraInitializers);
        __esDecorate(null, null, _refundInfo_decorators, { kind: "field", name: "refundInfo", static: false, private: false, access: { has: function (obj) { return "refundInfo" in obj; }, get: function (obj) { return obj.refundInfo; }, set: function (obj, value) { obj.refundInfo = value; } }, metadata: _metadata }, _refundInfo_initializers, _refundInfo_extraInitializers);
        __esDecorate(null, null, _otherInfo_decorators, { kind: "field", name: "otherInfo", static: false, private: false, access: { has: function (obj) { return "otherInfo" in obj; }, get: function (obj) { return obj.otherInfo; }, set: function (obj, value) { obj.otherInfo = value; } }, metadata: _metadata }, _otherInfo_initializers, _otherInfo_extraInitializers);
        __esDecorate(null, null, _reducibleTime_decorators, { kind: "field", name: "reducibleTime", static: false, private: false, access: { has: function (obj) { return "reducibleTime" in obj; }, get: function (obj) { return obj.reducibleTime; }, set: function (obj, value) { obj.reducibleTime = value; } }, metadata: _metadata }, _reducibleTime_initializers, _reducibleTime_extraInitializers);
        __esDecorate(null, null, _coverUrl_decorators, { kind: "field", name: "coverUrl", static: false, private: false, access: { has: function (obj) { return "coverUrl" in obj; }, get: function (obj) { return obj.coverUrl; }, set: function (obj, value) { obj.coverUrl = value; } }, metadata: _metadata }, _coverUrl_initializers, _coverUrl_extraInitializers);
        __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
        CourseInput = _classThis = _classDescriptor.value;
        if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
        __runInitializers(_classThis, _classExtraInitializers);
    })();
    return CourseInput = _classThis;
}();
exports.CourseInput = CourseInput;
var PartialCoursesInput = function () {
    var _classDecorators = [(0, graphql_1.InputType)()];
    var _classDescriptor;
    var _classExtraInitializers = [];
    var _classThis;
    var _classSuper = (0, graphql_1.PartialType)(CourseInput);
    var PartialCoursesInput = _classThis = /** @class */ (function (_super) {
        __extends(PartialCoursesInput_1, _super);
        function PartialCoursesInput_1() {
            return _super !== null && _super.apply(this, arguments) || this;
        }
        return PartialCoursesInput_1;
    }(_classSuper));
    __setFunctionName(_classThis, "PartialCoursesInput");
    (function () {
        var _a;
        var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create((_a = _classSuper[Symbol.metadata]) !== null && _a !== void 0 ? _a : null) : void 0;
        __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
        PartialCoursesInput = _classThis = _classDescriptor.value;
        if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
        __runInitializers(_classThis, _classExtraInitializers);
    })();
    return PartialCoursesInput = _classThis;
}();
exports.PartialCoursesInput = PartialCoursesInput;
